#pragma once
template<class Iterator, class Ref, class Ptr>
class ReserveIterator
{
	typedef ReserveIterator<Iterator> Self;
public:
	ReserveIterator(Iterator it)
		:_it(it)
	{}
	Self& operator++()
	{
		--_it;
		return *this;
	}
	Self& operator--()
	{
		++_it;
		return *this;
	}
	Ref operator*()
	{
		Iterator tmp = _it;
		return *(--tmp);
	}
	Ptr operator->()
	{
		return &(operator*());
	}
private:
	Iterator _it;
};